package com.css.dzj.dzjap.modules.lawenforcesuper.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "AP_SUPERSIVE_EXPERT_INFO", schema = "DZJAP", catalog = "")
public class ApSupersiveExpertInfoEntity {
    private String id;
    private Integer expertNum;
    private String taskId;
    private String recordId;
    private Double countryRatio;
    private Double provinceRatio;
    private Double cityRatio;
    private Date createTime;
    private String createPerson;
    private String remarks;
    private String major;
    private String unitName;
    private String recordExpertAddress;
    private String extractPersonDept;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "EXPERT_NUM")
    public Integer getExpertNum() {
        return expertNum;
    }

    public void setExpertNum(Integer expertNum) {
        this.expertNum = expertNum;
    }

    @Basic
    @Column(name = "TASK_ID")
    public String getTaskId() {
        return taskId;
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    @Basic
    @Column(name = "RECORD_ID")
    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId;
    }

    @Basic
    @Column(name = "COUNTRY_RATIO")
    public Double getCountryRatio() {
        return countryRatio;
    }

    public void setCountryRatio(Double countryRatio) {
        this.countryRatio = countryRatio;
    }

    @Basic
    @Column(name = "PROVINCE_RATIO")
    public Double getProvinceRatio() {
        return provinceRatio;
    }

    public void setProvinceRatio(Double provinceRatio) {
        this.provinceRatio = provinceRatio;
    }

    @Basic
    @Column(name = "CITY_RATIO")
    public Double getCityRatio() {
        return cityRatio;
    }

    public void setCityRatio(Double cityRatio) {
        this.cityRatio = cityRatio;
    }

    @JsonFormat(shape= JsonFormat.Shape.STRING,pattern="yyyy-MM-dd",timezone="GMT+8")
    @Basic
    @Column(name = "CREATE_TIME")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "CREATE_PERSON")
    public String getCreatePerson() {
        return createPerson;
    }

    public void setCreatePerson(String createPerson) {
        this.createPerson = createPerson;
    }

    @Basic
    @Column(name = "REMARKS")
    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    @Basic
    @Column(name = "MAJOR")
    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }
    @Basic
    @Column(name = "UNIT_NAME")
    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    @Basic
    @Column(name = "RECORD_EXPERT_ADDRESS")
    public String getRecordExpertAddress() {
        return recordExpertAddress;
    }

    public void setRecordExpertAddress(String recordExpertAddress) {
        this.recordExpertAddress = recordExpertAddress;
    }

    @Basic
    @Column(name = "EXTRACT_PERSON_DEPT")
    public String getExtractPersonDept() {
        return extractPersonDept;
    }

    public void setExtractPersonDept(String extractPersonDept) {
        this.extractPersonDept = extractPersonDept;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {return true;}
        if (o == null || getClass() != o.getClass()) {return false;}
        ApSupersiveExpertInfoEntity that = (ApSupersiveExpertInfoEntity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(expertNum, that.expertNum) &&
                Objects.equals(taskId, that.taskId) &&
                Objects.equals(recordId, that.recordId) &&
                Objects.equals(countryRatio, that.countryRatio) &&
                Objects.equals(provinceRatio, that.provinceRatio) &&
                Objects.equals(cityRatio, that.cityRatio) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(createPerson, that.createPerson) &&
                Objects.equals(remarks, that.remarks)&&
                Objects.equals(major, that.major)&&
                Objects.equals(unitName, that.unitName)&&
                Objects.equals(recordExpertAddress, that.recordExpertAddress)&&
                Objects.equals(extractPersonDept, that.extractPersonDept);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, expertNum, taskId, recordId, countryRatio, provinceRatio, cityRatio, createTime, createPerson, remarks,major,unitName,recordExpertAddress,extractPersonDept);
    }
}
